home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 10123 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.5 KB

  1. Path: newshost.lanl.gov!tanmoy
  2. From: tanmoy@qcd.lanl.gov (Tanmoy Bhattacharya)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: given: char foo[80]; there is no such thing as element foo[80] correct? (i.e. foo[80] = '\0' is beyond the array boundary)
  5. Date: 15 Mar 1996 18:10:07 GMT
  6. Organization: Los Alamos National Laboratory
  7. Message-ID: <TANMOY.96Mar15111007@qcd.lanl.gov>
  8. References: <3148DBB6.1353@hawaii.edu>
  9. NNTP-Posting-Host: qcd.lanl.gov
  10. Mime-Version: 1.0
  11. Content-Type: text
  12. In-reply-to: Dave Carien's message of Thu, 14 Mar 1996 18:53:42 -0800
  13.  
  14. In article <3148DBB6.1353@hawaii.edu>
  15. Dave Carien <davec@hawaii.edu> writes:
  16.  
  17. DC: Yes or no on this, I just recently got confused by two different books. I 
  18. DC: assume that the declaration foo[80] allocates storage for elements 0-79. 
  19. DC: A string could be terminated by doing something like foo[79] = '\0', but 
  20. DC: foo[80] = '\0' would be invalid because such an element does not exist. 
  21. DC: Just looking for confirmation that I'm right here. A simple Y or N will 
  22. DC: do thanks.
  23.  
  24. Yes, you are right.
  25.  
  26. Cheers
  27. Tanmoy
  28. --
  29. tanmoy@qcd.lanl.gov(128.165.23.46) DECNET: BETA::"tanmoy@lanl.gov"(1.218=1242)
  30. Tanmoy Bhattacharya O:T-8(MS B285)LANL,NM87545 H:#9,3000,Trinity Drive,NM87544
  31. Others see <gopher://yaleinfo.yale.edu:7700/00/Internet-People/internet-mail>,
  32. <http://alpha.acast.nova.edu/cgi-bin/inmgq.pl>or<ftp://csd4.csd.uwm.edu/pub/
  33. internetwork-mail-guide>. -- <http://nqcd.lanl.gov/people/tanmoy/tanmoy.html>
  34. fax: 1 (505) 665 3003   voice: 1 (505) 665 4733    [ Home: 1 (505) 662 5596 ]
  35.